﻿<UserControl x:Class="OnlineGameClient.View.GameRoomDetailView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:v="clr-namespace:OnlineGameClient.View"
             xmlns:comm="clr-namespace:Microsoft.Practices.Composite.Presentation.Commands;assembly=Microsoft.Practices.Composite.Presentation"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="40"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border Background="Silver" Grid.Row="1">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Border Style="{StaticResource grayborder2}">
                    <ItemsControl ItemsSource="{Binding CurrentGameRoom.Players}" Grid.Row="1">
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <v:PlayerView/>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
                </Border>
                <Border Grid.Column="1" Style="{StaticResource grayborder2}">
                    <sdk:TabControl Name="tabControl1">
                        <sdk:TabItem Header="Game config" Name="tabItem1">
                            <v:GameConfigView2 IsEnabled="False" x:Name="configview2" Loaded="GameConfigView2_Loaded"/>
                        </sdk:TabItem>
                        <sdk:TabItem Header="Game information" Name="tabItem2">
                            <ScrollViewer Name="sv1" VerticalScrollBarVisibility="Auto"/>
                        </sdk:TabItem>
                    </sdk:TabControl>
                </Border>
            </Grid>
        </Border>
        <Grid HorizontalAlignment="Left">
            <Border Style="{StaticResource tabborder}"/>
            <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Left">
                <Button Content="Leave this room" Style="{StaticResource tabbutton}"
                    comm:Click.Command="{Binding LeaveGameRoomCommand}"/>
                <Button Content="Start Game" Style="{StaticResource tabbutton}"
                    comm:Click.Command="{Binding StartGameCommand}"/>
            </StackPanel>
        </Grid>
    </Grid>
</UserControl>
